import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import Daohang from '../views/Daohang.vue'
import AboutView from '../views/AboutView.vue'
import AccountRegister from "../views/AccountRegister.vue"
import HousePublish from "@/views/HousePublish.vue"
import CaseImport from "@/views/CaseImport.vue"

const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/index.vue'),
  },
  {
    path: '/591',
    name: '591',
    children: [
      {
        path: 'dailyBug',
        name: 'dailyBug',
        component: () => import('@/views/DailyBug.vue')
      },
      {
        path: 'housePublish',
        name: 'housePublish',
        component: () => import('@/views/HousePublish.vue')
      },
      {
        path: 'testPlanCreate',
        name: 'testPlanCreate',
        component: () => import('@/views/PlanUtil.vue')
      },
      {
        path: 'sale_one_util',
        name: 'sale_one_util',
        component: () => import('@/views/SaleUtil.vue')
      },
      {
        path: 'sale_two_util',
        name: 'sale_two_util',
        component: () => import('@/views/SaleUtilTwo.vue')
      },
      {
        path: 'buildUtil',
        name: 'buildUtil',
        component: () => import('@/views/BuildUtil.vue')
      },
      {
        path: 'case_import',
        name: 'case_import',
        component: () => import('@/views/CaseImport.vue')
      },
      {
        path: 'reCharge',
        name: 'reCharge',
        component: () => import('@/views/ReCharge.vue')
      },
      {
        path: 'accountRegister',
        name: 'accountRegister',
        component: () => import('@/views/AccountRegister.vue')
      },
    ],
    component: () => import('@/views/home/index.vue'),
  }
]

const router = createRouter({
  // history: createWebHistory(process.env.BASE_URL),
  history: createWebHashHistory(process.env.BASE_URL),
  routes
})

export default router
